package com.ronri.ams;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.cz.nongyetongv5.R;

/**
 * 文件：Test3.java
 * 包名：com.ronri.test;   --- 正式发布时需要修正
 * 说明：轮播组件
 * 作者：MS During
 * 日期：2017/4/12
 * 历史：
 */
public class framentMost extends Fragment {
    /**
     * 新版界面相关信息：九宫格风格
     */
    private Context mContext = null;

    private RelativeLayout mMessage = null;
    private RelativeLayout mVersion = null;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View returnView = inflater.inflate(R.layout.fragment_most, container, false);

        mContext = getContext();

        mMessage = (RelativeLayout)returnView.findViewById(R.id.fMessage);
        mVersion = (RelativeLayout)returnView.findViewById(R.id.fVersion);

        mMessage.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(mContext, activity_opinion.class);
                startActivity(intent);
            }
        });

        mVersion.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(mContext, activity_version.class);
                startActivity(intent);
            }
        });

        return returnView;
    }
}
